<!--视图表组件-->
<template>
  <div id="view">
    <el-row style="margin: 10px 0px 20px 20px">
      <el-col :span="24">
        <el-button type="success" icon="el-icon-download">导出</el-button>
      </el-col>
    </el-row>
    <el-table
      :data="toChildrenData.tableData"
      border
      style="margin: 0px 10px 20px 20px; width: 96%">
      <el-table-column
        v-for="(item) in toChildrenData.columns"
        :key="item.prop"
        :prop="item.prop"
        :label="item.label">
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
  export default {
    name: "viewTable",
    props: {
      toChildrenData: {
        columns: {
          type: Array
        },
        tableData: {
          type: Array
        }
      }
    }
  }
</script>

<style scoped>
  #view {
    width: 100%;
    height: 100%;
  }
</style>
